<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <p>名单里是否有符合条件的小孩</p>
    <p>最小年龄: <input type="number" id="ageToCheck" value="18"></p>
    <button onclick="myFunction()">点我</button>
    <p>判断结果: <span id="demo"></span></p>

</body>
<script>

    var ages = [4, 5, 6, 7];
    function checkAdult(age) {
        return age >= document.getElementById("ageToCheck").value;
    }
    function myFunction() {
        document.getElementById("demo").innerHTML = ages.some(checkAdult);
    }

</script>

</html>